:root {
  --primary: #6366F1;
  --primary-light: #818CF8;
  --secondary: #EC4899;
  --dark: #1F2937;
  --light: #F9FAFB;
  --grey: #9CA3AF;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-width: 680px !important;
  min-height: 700px !important;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  width: 680px !important;
  height: 700px !important;
  overflow: hidden;
  color: var(--dark);
}

/* 全屏模式样式 - 当在新标签页打开时应用 */
body.in-tab {
  width: 100% !important;
  height: 100vh !important;
  min-width: 100% !important;
  min-height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
}

body.in-tab .container {
  margin: 0 auto;
  height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 680px;
  padding: 10px;
}

.header {
  position: relative;
  padding-right: 60px;
  text-align: center;
  margin-bottom: 20px;
}

.header h1 {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 5px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--grey);
}

.tabs {
  max-width: 1800px;
  display: flex;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tab.active {
  background-color: var(--primary);
  color: white;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.svg-input {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.svg-input textarea {
  flex: 1;
  padding: 15px;
  border: none;
  resize: none;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  background-color: #282c34;
  color: #abb2bf;
  border-radius: 8px;
  margin: 15px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.svg-input textarea:focus {
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.svg-output {
  flex: 1;
  padding: 8px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 8px;
  margin: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  position: relative;
}

.svg-output svg {
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.3s ease;
}

.svg-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.zoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  align-items: center;
  z-index: 1;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover {
  background-color: var(--primary-light);
  color: white;
}

.zoom-percentage {
  font-size: 12px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  min-width: 48px;
  text-align: center;
}

.buttons {
  display: flex;
  gap: 10px;
  margin: 10px 15px;
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button svg {
  width: 18px;
  height: 18px;
}

.preview-btn {
  background-color: var(--primary);
  color: white;
  flex: 1;
}

.preview-btn:hover {
  background-color: var(--primary-light);
}

.copy-btn, .paste-btn, .clear-btn {
  background-color: white;
  color: var(--dark);
  border: 1px solid var(--grey);
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.success {
  background-color: var(--success);
}

.error {
  background-color: var(--error);
}

.hidden {
  display: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* Animation for SVGs */
.svg-output svg {
  transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 680px) {
  body {
    width: 100%;
    height: 100vh;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: var(--light);
  }
  
  .tabs {
    background: rgba(31, 41, 55, 0.8);
  }
  
  .content {
    background: rgba(31, 41, 55, 0.9);
  }
  
  .svg-output {
    background-color: #111827;
  }
  
  .copy-btn, .paste-btn, .clear-btn {
    background-color: #374151;
    color: var(--light);
    border: 1px solid #4B5563;
  }
  
  .header p {
    color: #D1D5DB;
  }
  
  .language-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .language-btn:hover {
    background-color: var(--primary);
  }
}

/* 全屏模式下内容区域优化 */
body.in-tab .content {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 15px;
  height: calc(100vh - 160px);
}

body.in-tab .svg-input,
body.in-tab .svg-output {
  flex: 1;
  margin: 0;
  height: 100%;
  padding: 5px;
}

body.in-tab .svg-input:not(.hidden),
body.in-tab .svg-output:not(.hidden) {
  display: flex;
}

body.in-tab .tabs {
  display: none;
}

body.in-tab .header {
  margin-bottom: 20px;
}

body.in-tab .header h1 {
  font-size: 32px;
}

body.in-tab .buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
}

body.in-tab .preview-btn {
  max-width: 200px;
}

/* 全屏模式下自适应布局 */
@media (max-width: 992px) {
  body.in-tab .content {
    flex-direction: column;
  }
  
  body.in-tab .svg-input,
  body.in-tab .svg-output {
    height: calc(50vh - 150px);
  }
}

/* 语言切换按钮 */
.language-switch {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.language-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.language-btn:hover {
  background-color: var(--primary-light);
  color: white;
  border-color: var(--primary);
}

/* 全屏模式下的语言切换按钮 */
body.in-tab .language-switch {
  top: 30px;
  right: 30px;
}




/* 修复多语言切换后的布局一致性 */
[data-i18n] {
  transition: all 0.3s ease;
}

.button span {
  display: inline-block;
  min-width: 40px;
  text-align: center;
}

/* 暗色模式下的按钮 */
@media (prefers-color-scheme: dark) {
  .language-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .language-btn:hover {
    background-color: var(--primary);
  }
  
  .example-link {
    color: var(--primary-light);
  }
  
  .example-link:hover {
    background-color: rgba(131, 140, 248, 0.1);
    border-color: var(--primary-light);
  }
  
}

/* 全屏模式下的按钮 */
body.in-tab .language-switch {
  top: 30px;
  right: 30px;
}

/* 示例链接样式 */
.example-link {
  display: inline-block;
  position:absolute;
  bottom: 20px;
  right: 20px;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
  margin: 15px auto 5px auto;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 14px;
  text-align: center;
  background-color: transparent;
  border: 1px solid transparent;
  width: fit-content;
}

.example-link:hover {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.example-link:active {
  transform: translateY(0);
}



/* 在非全屏模式下增加容器高度 */
body:not(.in-tab) {
  height: 750px !important;
}

body:not(.in-tab) .container {
  height: 100%;
  /* padding: 15px; */
} 